home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / ADA / GNAT / !gcc / adainc / 6 / ads / s-tasque < prev    next >
Text File  |  1996-02-12  |  5KB  |  95 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                 GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS               --
  4. --                                                                          --
  5. --                 S Y S T E M . T A S K I N G . Q U E U I N G              --
  6. --                                                                          --
  7. --                                  S p e c                                 --
  8. --                                                                          --
  9. --                             $Revision: 1.16 $                             --
  10. --                                                                          --
  11. --      Copyright (C) 1991,1992,1993,1994,1995 Florida State University     --
  12. --                                                                          --
  13. -- GNARL is free software; you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNARL; see file COPYING.  If not, write --
  21. -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
  22. -- MA 02111-1307, USA.                                                      --
  23. --                                                                          --
  24. -- As a special exception,  if other files  instantiate  generics from this --
  25. -- unit, or you link  this unit with other files  to produce an executable, --
  26. -- this  unit  does not  by itself cause  the resulting  executable  to  be --
  27. -- covered  by the  GNU  General  Public  License.  This exception does not --
  28. -- however invalidate  any other reasons why  the executable file  might be --
  29. -- covered by the  GNU Public License.                                      --
  30. --                                                                          --
  31. -- GNARL was developed by the GNARL team at Florida State University. It is --
  32. -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
  33. -- State University (http://www.gnat.com).                                  --
  34. --                                                                          --
  35. ------------------------------------------------------------------------------
  36.  
  37. package System.Tasking.Queuing is
  38.  
  39.    procedure Broadcast_Program_Error
  40.      (Object : access Protection;
  41.       Pending_Call : Entry_Call_Link);
  42.    --  Raise Program_Error in all tasks calling the protected entries
  43.    --  of Object.  The exception will not be raised immediately for
  44.    --  the calling task; it will be deferred until it calls
  45.    --  Raise_Pending_Exception.
  46.  
  47.    procedure Enqueue (E : in out Entry_Queue; Call : Entry_Call_Link);
  48.    --  Enqueue Call at the end of entry_queue E
  49.  
  50.    procedure Dequeue (E : in out Entry_Queue; Call : Entry_Call_Link);
  51.    --  Dequeue Call from entry_queue E
  52.  
  53.    function Head (E : in Entry_Queue) return Entry_Call_Link;
  54.    --  Return the head of entry_queue E
  55.  
  56.    procedure Dequeue_Head
  57.      (E    : in out Entry_Queue;
  58.       Call : out Entry_Call_Link);
  59.    --  Remove and return the head of entry_queue E
  60.  
  61.    function Onqueue (Call : Entry_Call_Link) return Boolean;
  62.    --  Return True if Call is on any entry_queue at all
  63.  
  64.    function Count_Waiting (E : in Entry_Queue) return Natural;
  65.    --  Return number of calls on the waiting queue of E
  66.  
  67.    procedure Select_Task_Entry_Call
  68.      (Acceptor         : Task_ID;
  69.       Open_Accepts     : Accept_List_Access;
  70.       Call             : out Entry_Call_Link;
  71.       Selection        : out Select_Index;
  72.       Open_Alternative : out Boolean);
  73.    --  Select an entry for rendezvous.  On exit:
  74.    --    Call will contain a pointer to the entry call record selected;
  75.    --    Selection will contain the index of the alternative selected
  76.    --    Open_Alternative will be True if there were any open alternatives
  77.  
  78.    procedure Select_Protected_Entry_Call
  79.      (Object    : access Protection;
  80.       Call      : out Entry_Call_Link);
  81.    --  Select an entry of a protected object
  82.  
  83.    procedure Enqueue_Call (Entry_Call : Entry_Call_Link);
  84.    procedure Dequeue_Call (Entry_Call : Entry_Call_Link);
  85.    --  Enqueue (dequeue) the call to (from) whatever server they are
  86.    --  calling, whether a task or a protected object.
  87.  
  88.    procedure Requeue_Call_With_New_Prio
  89.      (Entry_Call : Entry_Call_Link; Prio : System.Any_Priority);
  90.    --  Change Priority of the call and re insert to the queue when priority
  91.    --  queueing is in effect. When FIFO is inforced, this routine
  92.    --  should not have any effect.
  93.  
  94. end System.Tasking.Queuing;
  95.